import 'package:get/get.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
import 'package:ball_lion/service/resource_service.dart';
import 'package:ball_lion/entity/other/resource_entity.dart';
import 'package:ball_lion/server/api/expert_api.dart';

import 'package:ball_lion/entity/expert/plan_pack/plan_pack_entity.dart';

class PlanPackLogic extends GetxController {
  List<ResourceEntity>? lbt;
  List<PlanPackEntity>? data;

  @override
  void onReady() {
    getData();
    super.onReady();
  }

  Future getData() async {
    lbt = Get.find<ResourceService>()
        .lbt
        .where((element) => element.button == "plan_package")
        .toList();
    data = await ExpertApi.getPlanPack();
    update();
  }
}
